import React from 'react';
import { GlobalStyle } from '../src/components/shared/global';

export const parameters = {
  // story 预设的参数
  actions: { argTypesRegex: "^on[A-Z].*" },
  controls: { expanded: true },
  // 暂时不知道干啥的，先不加
  // options: {
	// 	showRoots: true,
  // },
  // dependencies: {
	// 	withStoriesOnly: true,
	// 	hideEmpty: true,
  // },
  // 调整目录顺序
  // https://storybook.js.org/docs/react/writing-stories/naming-components-and-hierarchy#sorting-stories
  options: {
    storySort: {
      order: [
        'ATOM DESIGN',
        'COLOR',
        'Typography',
        'Example',
        ['Button', 'Icon', 'Highlight', 'Avatar', 'Badge', 'Radio', 'carousel']
      ]
    }
  }
}

// 全局样式注入
export const decorators = [(Story) => <><GlobalStyle /><Story/></>];

